package cn.ym.mall.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 订单表
 */
public class Order implements Serializable {
    /**
     * 订单id
     */
    private Integer oid;
    /**
     * 用户id
     */
    private Integer uid;
    /** 商家id */
    private Integer sid;
    /** 商品id */
    private Integer gid;
    /** 收件信息 */
    private String cinfoid;
    /** 订单创建时间 */
    private LocalDateTime ostartTime;
    /** 订单完成时间 */
    private LocalDateTime oendTime;
    /** 订单状态 （0 订单已支付   1 已发货   2 已到货   3 完成订单  4 申请退款(售后问题)    5 售后完成） */
    private int ostate;
    /** 数量 */
    private int ocount;
    /** 价格 */
    private double oprice;
    /** 删除状态 （0 用户删除订单，1 可以查看订单） */
    private int odelstate;

    public Order() {}

    public Order(Integer oid, Integer uid, Integer sid, Integer gid, String cinfoid, LocalDateTime ostartTime, LocalDateTime oendTime, int ostate, int ocount, double oprice, int odelstate) {
        this.oid = oid;
        this.uid = uid;
        this.sid = sid;
        this.gid = gid;
        this.cinfoid = cinfoid;
        this.ostartTime = ostartTime;
        this.oendTime = oendTime;
        this.ostate = ostate;
        this.ocount = ocount;
        this.oprice = oprice;
        this.odelstate = odelstate;
    }

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getCinfoid() {
        return cinfoid;
    }

    public void setCinfoid(String cinfoid) {
        this.cinfoid = cinfoid;
    }

    public LocalDateTime getOstartTime() {
        return ostartTime;
    }

    public void setOstartTime(LocalDateTime ostartTime) {
        this.ostartTime = ostartTime;
    }

    public LocalDateTime getOendTime() {
        return oendTime;
    }

    public void setOendTime(LocalDateTime oendTime) {
        this.oendTime = oendTime;
    }

    public int getOstate() {
        return ostate;
    }

    public void setOstate(int ostate) {
        this.ostate = ostate;
    }

    public int getOcount() {
        return ocount;
    }

    public void setOcount(int ocount) {
        this.ocount = ocount;
    }

    public double getOprice() {
        return oprice;
    }

    public void setOprice(double oprice) {
        this.oprice = oprice;
    }

    public int getOdelstate() {
        return odelstate;
    }

    public void setOdelstate(int odelstate) {
        this.odelstate = odelstate;
    }

    @Override
    public String toString() {
        return "Order{" +
                "oid=" + oid +
                ", uid=" + uid +
                ", sid=" + sid +
                ", gid=" + gid +
                ", cinfoid='" + cinfoid + '\'' +
                ", ostartTime=" + ostartTime +
                ", oendTime=" + oendTime +
                ", ostate=" + ostate +
                ", ocount=" + ocount +
                ", oprice=" + oprice +
                ", odelstate=" + odelstate +
                '}';
    }
}
